interface Person {
  name: string;
  age: number;
  job: string;
  sayName: () => void;
}

function NewPerson(name?: string, age?: number, job?: string): Person {
  return {
    name,
    age,
    job,
    sayName(): void {
      console.log(this.name);
    }
  };
}

export {};
